home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / python2.4 / encodings / utf_7.py < prev    next >
Text File  |  2005-10-18  |  550b  |  27 lines

  1. """ Python 'utf-7' Codec
  2.  
  3. Written by Brian Quinlan (brian@sweetapp.com).
  4. """
  5. import codecs
  6.  
  7. ### Codec APIs
  8.  
  9. class Codec(codecs.Codec):
  10.  
  11.     # Note: Binding these as C functions will result in the class not
  12.     # converting them to methods. This is intended.
  13.     encode = codecs.utf_7_encode
  14.     decode = codecs.utf_7_decode
  15.  
  16. class StreamWriter(Codec,codecs.StreamWriter):
  17.     pass
  18.  
  19. class StreamReader(Codec,codecs.StreamReader):
  20.     pass
  21.  
  22. ### encodings module API
  23.  
  24. def getregentry():
  25.  
  26.     return (Codec.encode,Codec.decode,StreamReader,StreamWriter)
  27.